﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 泛型1
{
    class Program
    {
        public delegate void EventHandler<TEventArgs>(object sender, TEventArgs e);
        public event  EventHandler<string> myEvent;  //泛型委托事件，必须用EventArgs
         void Main(string[] args)
        {
            //Stopwrach sw = new Stopwrach();
            Stopwatch sw = new Stopwatch();
            sw.Start();

          


            //myEvent += myClass.testEvent2("DZY","吃屎");
            //myList<string ,myList<>>  
            //var vi = new ArrayList();
            ////List<int> vi = new List<int>();
            //for(int i=0;i<200000;i++)
            //{
            //    vi.Add(i.ToString());
            //}

            //foreach(string ii in vi)
            //{
            //    //Console.WriteLine(ii.ToString());
            //    Console.WriteLine(ii);
            //}

            Console.WriteLine(sw.Elapsed);
            Console.ReadKey();
        }

        class myList<T1, T2> {
            public static myList(T1 t1, T2 t2)
            {
                Console.WriteLine(t1.ToString()+ " "+t2.ToString());

            }

           
        }
        class myClass
        {
          

            public static string testEvent1<T3, T4>(T3 t3, T4 t4)
            {
                return t3.ToString() + " " + t4.ToString();

            }

            public static void testEvent2<T3, T4>(T3 t3, T4 t4)
            {
                //return t3.ToString() + " " + t4.ToString();

            }
        }
    }
}
